class Solution:
    def search(self, nums: List[int], target: int) -> int:
        r=len(nums)-1
        l=0
        while r>=l:
            c=(r+l)//2
            if target>nums[c]:
                l=c+1
            elif target<nums[c]:
                r=c-1
            else:
                return c  
        return